package basics.breakycycle;

import org.junit.Test;

/**
 * @author jiangwz
 * @create 2019/11/4.
 */
public class TestBreak {

    @Test
    public void testBreak(){
        a:
        for (int i = 0; i < 100; i++) {
            System.out.print("i="+i);
            for (int j = 0; j < 100; j++) {
                System.out.println("j="+j);
                if (j==10){
                    break a;
                }
            }
        }
        System.out.println("over");

    }


    @Test
    public void testBreak2(){
        for (int i = 0; i < 100; i++) {
            System.out.print("i="+i);
            for (int j = 0; j < 100; j++) {
                System.out.println("j="+j);
                if (j==10){
                    break ;
                }
            }
        }
        System.out.println("over");

    }
}
